<!--# layout("/common/layout.html",{"jsBase":"/js/admin/saasuser/"}){ -->

<form class="layui-form layui-form-pane" id="addForm" lay-filter="editform">
    <input type="hidden" name="id" id="id" value="${id}">
    <div class="layui-row">
        <div class="layui-form-item">
            <label class="layui-form-label">用户姓名</label>
            <div class="layui-input-inline">
                <input type="text" name="name" autocomplete="off" lay-verify="required"
                       placeholder="请输入" class="layui-input" value="">
            </div>
            <label class="layui-form-label">用户帐号</label>
            <div class="layui-input-inline">
                <input type="text" name="code" lay-verify="required"
                       placeholder="请输入" autocomplete="off" class="layui-input"
                       value="">
            </div>
        </div>
    </div>
<!--# if(isEmpty(id)){ -->
    <div class="layui-row">
        <div class="layui-form-item">
            <label class="layui-form-label">初始密码</label>
            <div class="layui-input-inline">
                <input type="text" name="password" autocomplete="off" lay-verify="required"
                       placeholder="请输入" class="layui-input" value="">
            </div>
            <label class="layui-form-label">密码确认</label>
            <div class="layui-input-inline">
                <input type="text" name="password1" lay-verify="required"
                       placeholder="请输入" autocomplete="off" class="layui-input"
                       value="">
            </div>
        </div>
    </div>
<!--# } -->
    <div class="layui-row">
        <div class="layui-form-item">
            <!--# if(accessType==6){ -->
            <div class="layui-inline">
                <label class="layui-form-label">所属租户</label>
                <layui:simpleDataSelect name="tenantId" data="${tenantList}"
                                        attrId="tenantId" attrName="tenantName" laySearch="true"/>
            </div>
            <!--# } -->
            <label class="layui-form-label">用户状态</label>
            <layui:simpleDictSelect style='layui-input-inline' type="user_state"
                                    id="state" name="state" value=""/>
        </div>
    </div>
    <layui:submitButtons id="saveUser"/>
</form>
<!--#} -->
<script>
    layui.use(['add', 'form'], function () {
        var userAdd = layui.add;
        var form = layui.form;
        userAdd.init();
        <!--# if(!(isEmpty(userJson))){  -->
        var formJson = ${userJson};
        form.val("editform",formJson);
        <!--# } -->
    });

</script>

